import notification from 'ant-design-vue/lib/notification'

export default function ({ route, app, store }) {
  console.log(route.name)
  app.$auth.onError((error, name, endpoint) => {
    name.method === 'login' && process.client && notification.error({
      message: error.response.data.mesg,
      description: error.response.data.data.error_description
    })
  })
}
